using System.Collections.Generic;
using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application;

/// <summary>
///
/// </summary>
[SugarTable("ModuleCollectorGroup", "模组分组")]
[SysTable]
public class ModuleCollectorGroup : EntityTenant
{
	/// <summary>
	///
	/// </summary>
	public string Name { get; set; }

	/// <summary>
	///
	/// </summary>
	public int Version { get; set; }

	/// <summary>
	///
	/// </summary>
	public string Host { get; set; }

	/// <summary>
	///
	/// </summary>
	public int Port { get; set; }

	/// <summary>
	///
	/// </summary>
	public string User { get; set; }

	/// <summary>
	///
	/// </summary>
	public string Pwd { get; set; }

	/// <summary>
	///
	/// </summary>
	public int Rate { get; set; }

	public string? Sm { get; set; }

	/// <summary>
	/// 数据位长度
	/// </summary>
	public string Len { get; set; }

	/// <summary>
	///
	/// </summary>
	public string Stop { get; set; }

	/// <summary>
	///
	/// </summary>
	public string Par { get; set; }

	/// <summary>
	/// 0是采集器 1是modbus 2是自定义
	/// </summary>
	public string Type { get; set; }

	/// <summary>
	///
	/// </summary>
	public string Remark { get; set; }

	/// <summary>
	/// 时间间隔
	/// </summary>
	public int TimeInterval { get; set; }

	/// <summary>
	/// 地址表
	/// </summary>
	[SugarColumn(IsJson = true, ColumnDataType = "jsonb", IsNullable = true)]
	public List<string> Addresses { get; set; }

	/// <summary>
	/// 指令集
	/// </summary>
	[SugarColumn(IsJson = true, ColumnDataType = "jsonb", IsNullable = true)]
	public List<ModuleCollectorCmd> Cmds { get; set; }

	/// <summary>
	/// mqtt是否ssl
	/// </summary>
	public bool Isssl { get; set; }

	/// <summary>
	/// 设备发布消息主题
	/// </summary>
	public string PublishTopic { get; set; }

	/// <summary>
	/// 通讯地址，DLT645专用，原始顺序，下发时对其高低转换
	/// </summary>
	public string? Addr { get; set; }
}
